unit PushConApp.Command;

interface
uses
  System.SysUtils, System.Classes, System.Types, FireDAC.Stan.Intf, FireDAC.Stan.Option,
  FireDAC.Comp.Client,Data.DB,System.JSON,System.DateUtils,Soap.EncdDecd,MVCFramework.Logger,
  Ecaan.DB,MVCFramework,Ecaan.Command;
type
  TEcaanCommand = class
end;
  //Json
  function AppDataToJson(ADataset: TFDQuery;Rows:Integer): TJSONArray;
  function GetAppDataToJson(Status:Integer;Results:TJSONArray):String;overload;
  function GetAppDataToJson(Status:Integer;TotalArray,Results:TJSONArray):String;overload;
  function GetAppDataToJson(Status:Integer;TotalArray,GCXXArray,Results:TJSONArray):String;overload;
  function GetAppRWDataToJson(Status:Integer;GCXXArray,Results:TJSONArray):String;overload;
implementation

function AppDataToJson(ADataset: TFDQuery;Rows:Integer): TJSONArray;
begin
 Result :=DataToJson(ADataset,Rows);
end;

function GetAppDataToJson(Status:Integer;Results:TJSONArray):string;overload;
begin
 Result := GetDataToJson(Status,Results);
end;

function GetAppDataToJson(Status:Integer;TotalArray,Results:TJSONArray):string;overload;
begin
 Result := GetDataToJson(Status,TotalArray,Results);
end;
function GetAppDataToJson(Status:Integer;TotalArray,GCXXArray,Results:TJSONArray):String;overload;
 begin
 Result := GetDataToJson(Status,TotalArray,GCXXArray,Results);
end;

function GetAppRWDataToJson(Status:Integer;GCXXArray,Results:TJSONArray):String;overload;
 begin
 Result := GetDataRWToJson(Status,GCXXArray,Results);
end;

end.
